﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NGinnBPM.Lib.Data;

namespace NGinnBPM.Runtime.Messages
{
    /// <summary>
    /// Start a subprocess instance
    /// Message for NGEnvironment 
    /// NGEnvironment should respond with 
    /// </summary>
    [Serializable]
    public class StartSubprocessMessage
    {
        public string DefinitionId { get; set; }
        public Dictionary<string, object> InputData { get; set; }
        public string ParentTaskInstanceId { get; set; }
    }

    /// <summary>
    /// Response to StartSubprocessMessage
    /// sent by NGEnvironment
    /// </summary>
    [Serializable]
    public class StartSubprocessMessageResponse : TaskInstanceMessage
    {
        public string SubprocessInstanceId { get; set; }
        public bool Success { get; set; }
        public string ErrorInfo { get; set; }
    }
}
